Mac 安装Flutter环境

Mac 安装Flutter环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
安装flutter

//打开环境变量配置
open ~/.bash_profile

//加入下面环境变量
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

//生效
source ~/.bash_profile

//下载安装flutter
git clone -b master https://github.com/flutter/flutter.git

./flutter/bin/flutter --version

//打开环境变量配置
open ~/.bash_profile

//加一行 xxx 安装目录
export PATH=/xxx/flutter/bin:$PATH

//生效
source ~/.bash_profile

brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods

//配置
flutter doctor -v

其他
//创建flutter
flutter create flutter_module

//升级
flutter upgrade

//查看环境
flutter channel
-------------本文结束感谢阅读-------------